<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="flotalist.title"/></title>
    <meta name="heading" content="<fmt:message key='flotalist.heading'/>"/>    
</head>

<form:form commandName="flota" method="post" action="flotalist.html?search=search" 
	id="flotalist">

<c:set var="buttons">

    <input type="button" class="button" 
        onclick="location.href='<c:url value="/flota/flotaform.html?method=Add&from=list"/>'"
        value="<fmt:message key="button.add"/>"/>   
        
    <input type="button" class="button" 
    	onclick="location.href='<c:url value="/mainMenu.html"/>'"
        value="<fmt:message key="button.done"/>"/>
</c:set>

<ul>
	<li>
	<label class="desc"><fmt:message key="common.filtros.busqueda"/></label>
	<div class="group" style="width: 300px">
		<div>
			<fmt:message key="common.cliente"/><br/>
			<form:input path="deClienteEmpresa" id="deClienteEmpresa" cssClass="text medium"/>
		</div><br/>
		<div>
			<fmt:message key="common.flota"/><br/>
			<form:input path="deFlotaArea" id="deFlotaArea" cssClass="text medium"/>								
		</div><br/>		
		<div>
			<fmt:message key="common.ruc"/><br/>
			<form:input path="coRuc" id="coRuc" cssClass="text medium"/>
		</div><br/>		     		
		<div>
			<fmt:message key="label.habilitado"/><br/>
			<form:select path="stFlota" id="stFlota" cssClass="text medium">
				<form:option value="-"><fmt:message key="label.itemdefault"/></form:option>
				<form:option value="Y"><fmt:message key="common.yes"/></form:option>
				<form:option value="N"><fmt:message key="common.no"/></form:option>				
			</form:select>			
		</div>
		<br/><br/>				
		<div>					
			<input type="submit" class="button" name="save" onclick="bCancel=false" value="<fmt:message key="button.search"/>"/>
		</div>		
	</div>	
	</li>
</ul>

<c:out value="${buttons}" escapeXml="false" />

<display:table name="flotas" cellspacing="0" cellpadding="0" requestURI="" 
		    id="flota" pagesize="30" class="table" style="width: 900px" sort="page" >
		    
	<display:column property="deFlotaArea" titleKey="common.flota" 
	   	url="/flota/flotaform.html?from=list" paramId="id" paramProperty="id"/> 
		     	    
	<display:column property="deClienteEmpresa" titleKey="common.cliente"/>
	<display:column property="coRuc" titleKey="common.ruc"/>	  	
	<display:column titleKey="label.habilitado">
		<c:choose>
			<c:when test="${flota.stFlota eq 'Y'}">
				<fmt:message key='common.yes'/>
			</c:when>
		    <c:otherwise>
				<fmt:message key='common.no'/>
		    </c:otherwise>
		</c:choose>   
	</display:column>	     
</display:table>		

<c:if test="${not empty flotas}">
	<c:out value="${buttons}" escapeXml="false" />
</c:if>
</form:form>